<template>
  <div>
    <el-card>
      <el-form :inline="true" class="demo-form-inline" label-position="right">
        <el-row class="button_row">
          <el-col :span="24">
            <el-form-item>
              <el-button type="primary" @click="onClickStatics">
                一键静态化
              </el-button>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
    </el-card>
  </div>
</template>

<script  setup>
import { getAllStatic } from '@/api/config/staticize.js'
import { ElMessage } from 'element-plus'
// 一键静态化
const onClickStatics = () => {
  console.log('一键静态化')
  getAllStatic().then((res) => {
    ElMessage.success(res.message)
  })
}
</script>

<style lang="scss" scoped>
.el-card {
  min-height: 600px;
}
.button_row {
  text-align: center;
  margin-top: 30px;
}
</style>
